package com.ruoyi.datastatistics.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 电-历史数据对象 electricity_meter_history_data
 *
 * @author gdqt
 * @date 2025-05-29
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("electricity_meter_history_data")
public class ElectricityMeterHistoryData extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 平台表单自增主键 */
    @TableId(value="id",type = IdType.AUTO)
    private Long id;

    /** 设备归属水司 */
//    @Excel(name = "设备归属水司")
    @NotBlank(message = "tenantId不能为空")
    @TableField("tenant_id")
    private String tenantId;

    /**  */
//    @Excel(name = "")
    @NotBlank(message = "locationNb不能为空")
    @TableField("location_nb")
    private String locationNb;

    /** 厂家编号 */
//    @Excel(name = "厂家编号")
    @NotBlank(message = "厂家编号不能为空")
    @TableField("supplier_id")
    private String supplierId;


    /** 设备编号 */
    @Excel(name = "设备编号")
    @NotBlank(message = "设备编号不能为空")
    @TableField("terminal_id")
    private String terminalId;

    /** 正向有功电能 */
    @Excel(name = "正向有功电能")
    @TableField("positive_active_energy")
    private BigDecimal positiveActiveEnergy;

    /** 反向有功电能 */
    @Excel(name = "反向有功电能")
    @TableField("reverse_active_energy")
    private BigDecimal reverseActiveEnergy;

    /** 组合有功电能1 */
    @Excel(name = "组合有功电能1")
    @NotNull(message = "组合有功电能1不能为空")
    @TableField("combination_active_energy_1")
    private BigDecimal combinationActiveEnergy1;

    /** 组合有功电能2 */
    @Excel(name = "组合有功电能2")
    @TableField("combination_active_energy_2")
    private BigDecimal combinationActiveEnergy2;

    /** 组合无功电能1 */
    @Excel(name = "组合无功电能1")
    @TableField("combination_idle_energy_1")
    private BigDecimal combinationIdleEnergy1;

    /** 组合无功电能2 */
    @Excel(name = "组合无功电能2")
    @TableField("combination_idle_energy_2")
    private BigDecimal combinationIdleEnergy2;

    /** 第一象无功总电能 */
    @Excel(name = "第一象无功总电能")
    @TableField("first_idle_energy")
    private BigDecimal firstIdleEnergy;

    /** 第二象无功总电能 */
    @Excel(name = "第二象无功总电能")
    @TableField("second_idle_energy")
    private BigDecimal secondIdleEnergy;

    /** 第三象无功总电能 */
    @Excel(name = "第三象无功总电能")
    @TableField("third_idle_energy")
    private BigDecimal thirdIdleEnergy;

    /** 第四象无功总电能 */
    @Excel(name = "第四象无功总电能")
    @TableField("fourth_idle_energy")
    private BigDecimal fourthIdleEnergy;

    /** 有功需量 */
    @Excel(name = "有功需量")
    @TableField("active_req")
    private BigDecimal activeReq;

    /** 无功需量 */
    @Excel(name = "无功需量")
    @TableField("idle_req")
    private BigDecimal idleReq;

    /** 电流 */
    @Excel(name = "电流")
    @TableField("electric_current")
    private BigDecimal electricCurrent;

    /** 电压 */
    @Excel(name = "电压")
    @TableField("voltage_current")
    private BigDecimal voltageCurrent;

    /** 有功功率 */
    @Excel(name = "有功功率")
    @TableField("active_power")
    private BigDecimal activePower;

    /** a相正向有功电能 */
    @Excel(name = "a相正向有功电能")
    @TableField("a_positive_active_energy")
    @JsonProperty("aPositiveActiveEnergy")
    private BigDecimal aPositiveActiveEnergy;



    /** b相正向有功电能 */
    @Excel(name = "b相正向有功电能")
    @TableField("b_positive_active_energy")
    @JsonProperty("bPositiveActiveEnergy")
    private BigDecimal bPositiveActiveEnergy;

    /** c相正向有功电能 */
    @Excel(name = "c相正向有功电能")
    @TableField("c_positive_active_energy")
    @JsonProperty("cPositiveActiveEnergy")
    private BigDecimal cPositiveActiveEnergy;

    /** d相正向有功电能 */
    @Excel(name = "d相正向有功电能")
    @TableField("d_positive_active_energy")
    @JsonProperty("dPositiveActiveEnergy")
    private BigDecimal dPositiveActiveEnergy;

    /** 无功功率 */
    @Excel(name = "无功功率")
    @TableField("idle_power")
    private BigDecimal idlePower;

    /** 功率倍数 */
    @Excel(name = "功率倍数")
    @TableField("power_magnification")
    private BigDecimal powerMagnification;

    /** 正向有功最大需量发生时间 */
    @Excel(name = "正向有功最大需量发生时间")
    @TableField("positive_active_req_max_time")
    private BigDecimal positiveActiveReqMaxTime;

    /** 反向有功最大需量发生事件 */
    @Excel(name = "反向有功最大需量发生事件")
    @TableField("reverse_active_req_max_time")
    private BigDecimal reverseActiveReqMaxTime;

    /** 抄表时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "抄表时间不能为空")
    @Excel(name = "抄表时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField("read_date")
    private Date readDate;

    /** 距离上次的采集间隔分钟数 */
    @Excel(name = "距离上次的采集间隔分钟数")
    @TableField("`interval`")
    private Long interval;

    /** 频率F */
    @Excel(name = "频率F")
    @TableField("frequency")
    private BigDecimal frequency;

    @TableField(exist = false)
    private String userName;
    @TableField(exist = false)
    private String userId;
    @TableField(exist = false)
    private String userAddress;

    @TableField(exist = false)
    private String installAddress;
    @TableField(exist = false)
    private String sheetsCode;


    @TableField("positive_active_energy_s")
    private BigDecimal positiveActiveEnergyS;


}



